<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

   <table border="1" width="80%">
        <tr>
            <th>编号</th>
            <th>名称</th>
            <th>操作</th>
        </tr>

       <tr align="center" th:each="d:${list}">
            <td th:text="${d.depId}">
                1
            </td>
            <td th:text="${d.depName}">
                教育部
            </td>

           <td>
               <button th:onclick="'go('+${d.depId}+')'">删除</button>
           </td>
       </tr>

   </table>

</body>
</html>

<script>
    function go(id) {
        alert(id);
        var age = [[${age}]];
        alert(age);
    }
</script>
